﻿using System.Linq.Expressions;

namespace Text.IDal
{
    public interface IBaseDal<T>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="t">某个实体</param>
        /// <returns>受影响行数</returns>
        Task<int> ADD(T t);
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="exp">查询条件</param>
        /// <returns>返回查询的数据</returns>
        Task<T> GetValue(Expression<Func<T, bool>> exp);
        /// <summary>
        /// 显示列表
        /// </summary>
        /// <returns>返回显示的数据</returns>
        IQueryable<T> GetList();
    }
}
